You can use the SndManagerStatus function to get a Sound Manager status record, which gives information on the current CPU loading caused by all open channels of sound. The SMStatus data type defines a Sound Manager status record.
TYPE SMStatus =
PACKED RECORD
smMaxCPULoad: Integer; {maximum load on all channels}
smNumChannels: Integer; {number of allocated channels}
smCurCPULoad: Integer; {current load on all channels}
END;
Although you can use the information contained in the Sound Manager status record to determine how many channels are allocated, you should not rely on the information in the smMaxCPULoad or smCurCPULoad field. To determine whether the Sound Manager can create a new channel, simply call the SndNewChannel function, which returns an appropriate result code if it is unable to allocate a new channel.
| Previous | Chapter contents | Chapter top | Section top | Next |